package jee.boot.module.sms.config;

import jee.boot.module.sms.sender.AliSmsSender;
import jee.boot.module.sms.sender.ISmsSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SmsConfig {


    @Bean
    @ConditionalOnMissingBean(ISmsSender.class)
    public ISmsSender smsSender(@Autowired AliSmsConfig aliSmsConfig){
        return new AliSmsSender(aliSmsConfig);
    }

}
